package com.sz.biz.app.web.api;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * Function: 获取上下文信息描述 <br>
 * Author: Charles <br>
 * Date: 2016-11-02 10:47:00
 */
@RestController
@RequestMapping("/api/v1")
@Api(description = " ", tags = "000、版本说明")
public class About {

    @Value("${logistics.build.name}")
    private String name;
    @Value("${logistics.build.version}")
    private String version;
    @Value("${logistics.build.timestamp}")
    private String timestamp;

    @RequestMapping(value = "/about", method = {RequestMethod.GET})
    @ApiOperation(value = "版本说明", notes = "版本说明")
    public Map<String, String> about() {
        Map<String, String> map = new HashMap<>();
        map.put("name", name);
        map.put("version", version);
        map.put("date", timestamp);
        return map;
    }
}
